package com.jiutong.dao.impl;

import com.jiutong.dao.BaseDao;
import com.jiutong.dao.UserDao;
import com.jiutong.pojo.User;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * Created by sty on 2017/2/22.
 */
//@Repository
public class UserDaoImpl extends BaseDao implements UserDao {

    @Override
    public User findById(int id) {
        return getSqlSessionTemplate9tongUser().selectOne("User.findById",id);
    }

    @Override
    public int save(User user) {
        return getSqlSessionTemplate9tongUser().update("User.save",user);
    }
}
